Page({

  data:{
    src: '',
  },
  onLoad(){
    wx.cloud.downloadFile({
      fileID : 'cloud://cloud-server-001-5f5x6e22f15c116.636c-cloud-server-001-5f5x6e22f15c116-1303980373/my-image.jpg',
    }).then(res=>{
      console.log(res);
      this.setData({
        src: res.tempFilePath,
      })
    })
  },
  deleteImage(){

    wx.showModal({
      title: '您正在删除文件',
      content: '确定要删除云存储得图片吗?',
      success(res){
        console.log(res);
        if(res.confirm){
          wx.cloud.deleteFile({
            fileList: [
              '	cloud://cloud-server-001-5f5x6e22f15c116.636c-cloud-server-001-5f5x6e22f15c116-1303980373/my-image.jpg',
              'cloud://cloud-server-001-5f5x6e22f15c116.636c-cloud-server-001-5f5x6e22f15c116-1303980373/wxacode_default_openapi_page.jpeg',
              'cloud://cloud-server-001-5f5x6e22f15c116.636c-cloud-server-001-5f5x6e22f15c116-1303980373/otpmB4ozTBaUkhcLwf61t_jfIrRc/0.6998724803167209_1608188494186.jpg'
            ]
          })
        }
      },
    })

  },
  
})